#ifndef _KZLIB_DAC8000X_
#define _KZLIB_DAC8000X_

#include "../common_typedef.h"

enum DAC8000x_CHx {
    DAC8000x_CHA,
    DAC8000x_CHB,
    DAC8000x_CHC,
    DAC8000x_CHD,
    DAC8000x_ACH
};

class DrvDac8000x {
public:
    DrvDac8000x(
        uint32_t dataBus,
        uint32_t ioCs,
        uint32_t ioLoad,
        uint32_t ioClr
    ) : m_dataBus(dataBus), m_ioCs(ioCs), m_ioLoad(ioLoad), m_ioClr(ioClr)
    {

    }
    void Init();
    void SetDacDataBuffer(DAC8000x_CHx ch, uint16_t dacData);
    void LoadVoltage();

private:
    uint32_t m_dataBus = 0xffffffff;
    uint32_t m_ioCs = 0xffffffff;
    uint32_t m_ioLoad = 0xffffffff;
    uint32_t m_ioClr = 0xffffffff;
};

#endif